package com.noob.susu.excel.exception;

import com.noob.susu.excel.enums.BaseEnum;
import lombok.Getter;

/**
 * 异常
 *
 * @author shupeng_liao
 * @date 2019/10/23 17:02
 **/
@Getter
public class ExcelResolveException extends RuntimeException {

    private String code;
    private String message;

    public ExcelResolveException(String code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public ExcelResolveException(BaseEnum baseEnum) {
        super(baseEnum.getMsg());
        this.code = baseEnum.getCode();
        this.message = baseEnum.getMsg();
    }
}
